package com.twu.biblioteca.domain;

public class LoginToken {
    private String libraryNumber;
    private String password;

    public LoginToken(String libraryNumber, String password){
        this.libraryNumber = libraryNumber;
        this.password = password;
    }

    @Override
    public boolean equals(Object obj){
        if (obj == null || obj.getClass() != this.getClass())
            return false;

        LoginToken other = (LoginToken)obj;

        return other.libraryNumber.equals(this.libraryNumber) &&
               other.password.equals(this.password);

    }

    @Override
    public int hashCode(){
        return this.libraryNumber.hashCode() ^ this.password.hashCode();
    }
}
